home *** CD-ROM | disk | FTP | other *** search
- #! /bin/sh
- #
- # Laptop mode tools module: Scheduler tunables for multi-socket SMT systems.
- #
-
- if [ x$CONTROL_SCHED_SMT_POWER_SAVINGS = x1 ] || [ x$ENABLE_AUTO_MODULES = x1 -a x$CONTROL_SCHED_SMT_POWER_SAVINGS = xauto ]; then
- if [ $ON_AC -eq 1 ]; then
- log "VERBOSE" "On AC power: setting scheduler power saving to 0."
- if [ -w /sys/devices/system/cpu/sched_smt_power_savings ]; then
- echo 0 > /sys/devices/system/cpu/sched_smt_power_savings
- log "VERBOSE" "Scheduler SMT power save mode disabled."
- else
- log "VERBOSE" "Scheduler SMT power saving is not available."
- fi
- else
- log "VERBOSE" "On battery: setting scheduler power saving to 1."
- if [ -w /sys/devices/system/cpu/sched_smt_power_savings ]; then
- echo 2 > /sys/devices/system/cpu/sched_smt_power_savings
- log "VERBOSE" "Scheduler SMT power save mode enabled."
- else
- log "VERBOSE" "Scheduler SMT power saving is not available."
- fi
-
- fi
- else
- log "VERBOSE" "Scheduler power setting is disabled."
- fi
-
-